package com.xinziruo.richclient.util.filecommand;


/**
 * 
 * @author loudyn
 * 
 */
public abstract class SelectiveSupportFileCommand implements FileCommand {

	/*
	 * (non-Javadoc)
	 * 
	 * @see com.forgov.sharpc.infrastruture.file.command.FileCommand#execute()
	 */
	@Override
	public final void execute() {
		if (support()) {
			executeWhenSupport();
		}
	}

	/**
	 * 
	 * @return
	 */
	protected boolean support() {
		return true;
	}

	/**
	 * 
	 */
	protected abstract void executeWhenSupport();
}
